.canvas-wrapper {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

/* 无限画布层 - 移除背景属性 */
.infinite-canvas {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  will-change: transform;
  transition: transform 0.05s linear;
}

/* 背景层 */
.background-grid {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(circle, #ccc 1px, transparent 1px);
}

/* 拖动状态禁用动画 */
.infinite-canvas.dragging {
  transition: none !important;
}

/* 控制层叠顺序 */
.card {
  z-index: 10;
}

.connection {
  z-index: 5; 
}

.selection-box {
  z-index: 20;
}

/* 确保绘图层在最上层 */
.drawing-layer {
  z-index: 100;
}
